package com.sinochem.yunlian.ship.common.enums;

import lombok.Getter;

/**
 * @Auther: zzd
 * @Dscription:
 * @Date: Create in 2018/1/27 14:31
 **/
public enum OrderCancelType {
    CARGOCANCEL(0,"货主"),
    SHIPCANCEL(1,"船东"),
    BOTHCANCEL(2,"双方协商");

    @Getter
    private int code;
    @Getter
    private String name;

    OrderCancelType(int code, String name){
        this.code = code;
        this.name = name;
    }

    public static String valueOf(int code){
        String name = "";
        switch ( code ) {
            case 0:
                name = "货主";
                break;
            case 1 :
                name = "船东";
                break;
            case 2 :
                name = "双方协商";
                break;
            default:
                name = "";
                break;
        }
        return name;
    }


}
